﻿#if NETFX_CORE
#define WINRT

namespace System.ComponentModel.Composition 
{ 
    public class ExportAttribute : Attribute
    {
        public ExportAttribute(Type type) { }
    }

    
}
namespace System.ComponentModel.Composition.Hosting { }

namespace System
{
    using System.Collections.Generic;
    using System.Reflection;
    public static class TypeExtension
    {
        public static bool IsAssignableFrom(this Type type1, Type type2)
        {
            return type1.GetTypeInfo().IsAssignableFrom(type2.GetTypeInfo());
        }

      
    }

    public static class DateTimeExtension
    {

        public static string ToShortDateString(this DateTime dt)
        {
            return dt.ToString(System.Globalization.DateTimeFormatInfo.CurrentInfo.ShortDatePattern);
        }
        public static string ToShortTimeString(this DateTime dt)
        {
            return dt.ToString(System.Globalization.DateTimeFormatInfo.CurrentInfo.ShortTimePattern);
        }
    }

    public static class StringExtension
    {
        public static bool Contains(this string str, string lookup)
        {
            return str.IndexOf(lookup) != -1;
        }

        public static bool Contains(this string str, char lookup)
        {
            return str.IndexOf(lookup) != -1;
        }
    }
}


namespace System.ComponentModel.DataAnnotations.Schema
{
    public class NotMappedAttribute : Attribute
    {
    }
}


namespace System.IO
{
    // Summary:
    //     Specifies how the operating system should open a file.
    public enum FileMode
    {
        CreateNew = 1,
        Create = 2,
        Open = 3,
        OpenOrCreate = 4,
        Truncate = 5,
        Append = 6,
    }

    [Flags]
    public enum FileAccess
    {
        Read = 1,
        Write = 2,
        ReadWrite = 3,
    }

    [Flags]
    public enum FileShare
    {
        None = 0,
        Read = 1,
        Write = 2,
        ReadWrite = 3,
        Delete = 4,
        Inheritable = 16,
    }
}


#endif